/////////////////////////////////////////////////////////////////////////////
// Name:        ax_document.h
// Purpose:     Accessibility classes: AxDocument
// Author:      Julian Smart
// Modified by:
// Created:     2009-03-20
// RCS-ID:
// Copyright:   (c) Julian Smart
// Licence:     New BSD License
/////////////////////////////////////////////////////////////////////////////

#ifndef _AX_DOCUMENT_H_
#define _AX_DOCUMENT_H_

/**
    @class AxDocument

    A general document class used in conjunction with AxView.

    @category{ax}
 */

class AxDocument: public wxEvtHandler
{
    DECLARE_DYNAMIC_CLASS( AxDocument )

public:
// Constructors

    AxDocument(const AxDocument& doc) { Init(); Copy(doc); }
    AxDocument() { Init(); }
    ~AxDocument();

// Operations

    void Init();

    /// Copy the basic information.
    void Copy(const AxDocument& doc);

    /// Assignment operator
    void operator=(const AxDocument& doc) { Copy(doc); }

    /// Test equality for the basic information
    bool Eq(const AxDocument& doc) const;

    /// Clone - derived classes must implement this function.
    virtual AxDocument* Clone() const { return new AxDocument(*this); }

    /// Get the modified flag.
    virtual bool GetModified() const { return m_modified; }

    /// Set the modified flag.
    virtual void SetModified(bool mod) { m_modified = mod; }

protected:

    bool                    m_modified;
};

#endif
    // _AX_DOCUMENT_H_
